import { baseRequestClient, requestClient } from '#/api/request';
import type { RouteRecordStringComponent } from '@vben/types';

// 操作日志
export async function getOperationLog(page: number, limit: number, query: any) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/log/findLogInfo`,
    {
      params: {
        page,
        limit,
        ...query,
      },
    },
  );
}
// 查询数据字典
export async function getDictionary(pageNo: number, pageSize: number) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/findType`,
    {
      params: {
        pageNo,
        pageSize,
      },
    },
  );
}
// 查询数据字典2
export async function getDictionary2(
  pageNo: number,
  pageSize: number,
  id: string,
) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/findDictionary`,
    {
      params: {
        pageNo,
        pageSize,
        id,
      },
    },
  );
}
// 新增数据字典
export async function addDictionary(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/insertDictionaryType`,
    data,
  );
}
// 新增数据字典2
export async function addDictionary2(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/addDictionary`,
    data,
  );
}
// 编辑数据字典
export async function editDictionary(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/updateDictionaryType`,
    data,
  );
}
// 编辑数据字典2
export async function editDictionary2(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/updateDictionary`,
    data,
  );
}
// 删除数据字典
export async function delDictionary(id: string) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/deleteDictionaryType`,
    {
      params: {
        id,
      },
    },
  );
}
// 删除数据字典2
export async function delDictionary2(byId: string) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/dic/delDictionary`,
    {
      params: {
        byId,
      },
    },
  );
}
// 查询合同管理信息
export async function getContractInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/contract/findContractInfo`,
    data,
  );
}
// 新增合同管理
export async function addContractInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/contract/insertContract`,
    data,
  );
}
// 上传合同图片、文件、合同内容
export async function uploadContractFile(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/contract/uploadContract`,
    data,
  );
}
// 修改合同管理
export async function editContractInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/contract/updateContract`,
    data,
  );
}
// 删除合同管理
export async function delContractInfo(id: any) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/contract/delContract?id=${id}`,
  );
}
// 供暖停供协议查询
export async function getProtocolInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/heating/findHeatingAgreement`,
    data,
  );
}
// 供暖停供协议新增
export async function addProtocolInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/heating/insertHeatingAgreement`,
    data,
  );
}
// 供暖停供协议编辑
export async function editProtocolInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/heating/updateHeatingAgreement`,
    data,
  );
}
// 供暖停供协议删除
export async function delProtocolInfo(id: any) {
  return requestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/heating/delHeatingAgreement?id=${id}`,
  );
}
// 项目停用查询
export async function getProjectStopInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/sub/findProjectSu`,
    data,
  );
}
2;
// 申请停用
export async function applyProjectStop(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/sub/insertProjectSus`,
    data,
  );
}
// 审批需要的请求
export async function getProjectStopApproval(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/sub/updateProjectSu`,
    data,
  );
}
// 审批页面查询信息
export async function getProjectStopApprovalInfo(data: any) {
  return requestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/sub/findProjectSu2`,
    data,
  );
}
// 通知管理查询
export async function getNoticeInfo(data: any) {
  return baseRequestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/visible/getVisibleList`,
    {
      params: {
        ...data,
      },
    },
  );
}
// 新增通知
export async function addNoticeInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/visible/createVisible`,
    data,
  );
}
// 编辑通知
export async function editNoticeInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/visible/submitUpdate`,
    data,
  );
}
// 删除通知
export async function delNoticeInfo(data: any) {
  return baseRequestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/visible/submitDelete?id=${data}`,
  );
}
// 通知中心查询
export async function getNoticeCenterInfo(data: any) {
  return baseRequestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/visible/getNotifications`,
    {
      params: {
        ...data,
      },
    },
  );
}
// 参数维护查询
export async function getParameterMaintenanceInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/findParameter`,
    data,
  );
}
// 参数维护新增
export async function addParameterMaintenanceInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/insertParameter`,
    data,
  );
}
// 参数维护编辑
export async function editParameterMaintenanceInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/updateParameter`,
    data,
  );
}

// 参数维护删除
export async function delParameterMaintenanceInfo(data: any) {
  return baseRequestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/deleteParameter?id=${data}`,
  );
}
// 参数优先级查询
export async function getParameterPriorityInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/findBookkeeping`,
    data,
  );
}
// 参数优先级新增
export async function addParameterPriorityInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/insertBookkeeping`,
    data,
  );
}
// 参数优先级修改
export async function editParameterPriorityInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/updateBookkeeping`,
    data,
  );
}
// 参数优先级删除
export async function delParameterPriorityInfo(data: any) {
  return baseRequestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/parameter/deleteBookkeeping?id=${data}`,
  );
}
// 短信模版查询
export async function getSmsTemplateInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/message/findMesTemplate`,
    data,
  );
}
// 短信模版新增
export async function addSmsTemplateInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/message/addMesTemplate`,
    data,
  );
}
// 短信模版修改
export async function editSmsTemplateInfo(data: any) {
  return baseRequestClient.post<RouteRecordStringComponent[]>(
    `/ChargeSystem/message/updateMesTemplate`,
    data,
  );
}
// 短信模版删除
export async function delSmsTemplateInfo(data: any) {
  return baseRequestClient.get<RouteRecordStringComponent[]>(
    `/ChargeSystem/message/deleteMesTemplate?id=${data}`,
  );
}
